﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ViewNews.aspx.cs" Inherits="Think.Lenovo.Com.ViewNews" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <!-- stylesheets -->
    <link href="/Contents/css/skin.css" rel="stylesheet" type="text/css" />
    <script src="/Contents/resources/scripts/jquery-ui-1.8.custom.min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="/Contents/resources/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="/Contents/resources/css/style.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="/Contents/resources/css/style_fixed.css" />
    <link id="Link1" rel="stylesheet" type="text/css" href="/Contents/resources/css/colors/blue.css" />
    <meta http-equiv="Cache-Control" content="no" />
    <link rel="stylesheet" type="text/css" href="/Contents/resources/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="/Contents/resources/css/style.css" media="screen" />
    <link id="color" rel="stylesheet" type="text/css" href="/Contents/resources/css/colors/blue.css" />
    <script type="text/javascript" src="/Scripts/lib/jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="/Scripts/lib/SerializeObject.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="content" style="background: url(/Contents/resources/images/background.png);">
        <!-- content / right -->
        <div id="right">
            <div class="box">
                <!-- box / title -->
                <div class="title">
                    <h5>
                        新闻列表</h5>
                </div>
                <div class="table">
                    <div>
                        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                            OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowEditing="GridView1_RowEditing"
                            OnRowUpdating="GridView1_RowUpdating" AllowSorting="True" OnPageIndexChanging="GridView1_PageIndexChanging"
                            OnRowDeleting="GridView1_RowDeleting" DataKeyNames="id" OnRowDataBound="GridView1_RowDataBound">
                            <Columns>
                                <asp:BoundField DataField="id" HeaderText="id" ReadOnly="true" />
                                <asp:BoundField DataField="title" HeaderText="标题" ReadOnly="true" />
                                <asp:BoundField DataField="Author" HeaderText="作者" ReadOnly="true" />
                                <asp:TemplateField HeaderText="发布日期">
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("ReleaseDate","{0:d}") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:HyperLinkField DataNavigateUrlFields="id" HeaderText="更新文章" DataNavigateUrlFormatString="ViewNewsAdd.aspx?id={0}"
                                    Target="_blank" Text="编辑文章" />
                                <asp:BoundField DataField="taxis" HeaderText="排序" />
                                <asp:CommandField ShowEditButton="True" EditText="编辑排序" />
                                <asp:CommandField ShowDeleteButton="True" />
                            </Columns>
                            <EmptyDataTemplate>
                                没有新闻
                            </EmptyDataTemplate>
                        </asp:GridView>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
